package com.neuedu.myapplication;

import static android.content.Context.MODE_PRIVATE;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * @ClassName SPManagerUtils
 * @Author name
 * @Date 2025/4/8
 * Description
 */
public class SPManagerUtils {

    public static void setToken(Context context, String token) {
        SharedPreferences sp = context.getSharedPreferences("user_info", MODE_PRIVATE);
        SharedPreferences.Editor edit = sp.edit();
        edit.putString("token", token);
        edit.apply();
    }
    public static String getToken(Context context) {
        SharedPreferences sp = context.getSharedPreferences("user_info", MODE_PRIVATE);
        return sp.getString("token", "");
    }

}

